#ifndef __ALL_CON_H
#define __ALL_CON_H

#include "init.h"

union MPU_6500_Y_A
{
	uint8_t Yaw[4];
	float 	Yaw_ref;
};
union MPU_6500_P_G
{
	uint8_t Pith[4];
	float 	Pith_ref;
};

union MPU_6500_Y_G
{
	uint8_t Yaw[4];
	float 	Yaw_ref;
};
union MPU_6500_P_A
{
	uint8_t Pith[4];
	float 	Pith_ref;
};

typedef __packed struct
{
    int16_t forward_back_ref;
    int16_t left_right_ref;
    int16_t rotate_ref;
}ChassisSpeed_Ref_t;

typedef struct
{
  double           vx; // forward/back
  double           vy; // left/right
  double           vw; // 
  int16_t         rotate_x_offset;
  int16_t         rotate_y_offset;
  
  float           gyro_angle;
  float           gyro_palstance;

  int16_t         wheel_spd_fdb[4];
  int16_t         wheel_spd_ref[4];
  int16_t         current[4];
  
  float         position_ref;
  uint8_t         follow_gimbal;
	int8_t         dirx;
	int8_t         diry;
} chassis_t;


typedef struct
{	
    float pitch_angle_dynamic_ref;			
    float yaw_angle_dynamic_ref;
	  float pitch_angle_RK_dynamic_ref;			
    float yaw_angle_RK_dynamic_ref;
		float Buff_Ref_YAW;
		float Buff_Ref_PITCH;
}Gimbal_Ref_t;










#endif
